package com.huayi.datagovernance.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author wuch
 * @version 1.0
 * @date 2021/4/12 15:50
 */
@Data
@ApiModel(value = "汽车",description = "用户拓展属性")
public class Car implements Serializable {
    /**
     * 车牌号
     */
    @ApiModelProperty(value = "plateNumber", notes = "车牌号")
    @Pattern(regexp = "^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$", message = "车牌号格式有误")
    private String plateNumber;

    /**
     * 品牌
     */
    @ApiModelProperty(value = "brand", notes = "品牌")
    @NotBlank(message = "车的品牌不能为空")
    private String brand;

}
